﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using TripLOA.GUI.internationalization;
using Stats;
using Stats.Objects;
using Groupware;

namespace GUI
{
    public partial class publicStats : TripLOA.GUI.internationalization.LOABasePage
    {
        #region Page_Load
        protected void Page_Load(object sender, EventArgs e)
        {
            // Set the language to use in the Silverlight control
            GraphLanguage.Text = (String) Session[LOAGlobal.Global.SESSION_KEY_CULTURE];


            // Fills the main stats table
            GeneralStats statsObj = StatsModule.getGeneralStats();

            stvTotPollution.Text = statsObj.TotalPollutionSaved.ToString();
            stvTotFuel.Text = statsObj.TotalFuelSaved.ToString();
            stvTotMoney.Text = statsObj.TotalMoneySaved.ToString();

            stvProposedTrip.Text = statsObj.ProposedTripsNumber.ToString();
            stvCompletedTrip.Text = statsObj.CompletedTripsNumber.ToString();

            stvTotalKm.Text = statsObj.TotalKm.ToString();
            stvAverageKm.Text = statsObj.AverageTripsKm.ToString();

            stvTotPassengers.Text = statsObj.TotalPassengersCarried.ToString();
            stvMaxPassengers.Text = statsObj.MaxPassengerCarried.ToString();
            stvPassengersOnWay.Text = statsObj.PassengersCarriedOnWayNumber.ToString();

            stvMissedDrivers.Text = statsObj.MissedAppointmentsByDrivers.ToString();
            stvMissedPassengers.Text = statsObj.MissedAppointmentsByPassengers.ToString();

            stvRegUsers.Text = statsObj.RegisteredUsers.ToString();
            stvUptime.Text = statsObj.NumberDaysStatsReferred.ToString();

        }
        #endregion


        #region Page_PreRender
        protected void Page_PreRender(object sender, EventArgs e)
        {
        }
        #endregion


    }
}
